gtk/gentypefuncs.py: Open files in utf-8 encoding
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 1 Aug 2017 08:44:20 +0000 (16:44 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Fri, 15 Sep 2017 13:41:15 +0000 (21:41 +0800)
commit0332dbca94c157034588468e2655746818d4bbf3
treec6cf702c3b6b705f629a888cd1968c504c1b297c
parente5a1de1c1948898dda89fae4bbc17addb3595d20
gtk/gentypefuncs.py: Open files in utf-8 encoding

On Python-3.x, we need to set the encoding when opening files, when this
script is run, as it might contain items that are not supported by the
system's locale (for example, non-English Windows).  So, we use a
wrapper to set the encoding on Python 3.x, but open the file as we did
when using Python 2.x, since file encodings are not supported there.

https://bugzilla.gnome.org/show_bug.cgi?id=785210
gtk/gentypefuncs.py